<html>
<head>
	<meta charset="UTF-8">
	<title>listusers</title>
</head>
<body>
<h2><a href="admin.php?c=video&m=videoform">添加视频</a></h2>
<center><h2>视频列表（共有<?php echo count($data['videos']); ?>个视频）</h2></center>
<table border="1" align="center" width="80%">

<tr>
	<th>序号</th>
	<th>视频名称</th>
	<th>类别</th>
	<th>添加时间</th>
	<th>海报</th>
	<th>操作</th>
</tr>
<?php 
foreach ($data['videos'] as $row) {
?>
<tr>
	<td><?php echo $row['vid'];?></td>
	<td><?php echo $row['videoname'];?></td>
	<td>
	<?php  
		switch ($row['tid']) {
			case '1':
				echo "电影";
				break;
			case '2':
				echo "电视剧";
				break;
			case '3':
				echo "动画片";
				break;
			case '9':
				echo "原创";
				break;
			default:
				echo "未知类型";
				break;
		}
	?>
	</td>
	<td><?php echo $row['uploaddate'];?></td>
	<td>
	<img src="./posters/<?php echo $row['pic'];?>" width="80" height="80" alt="海报" title="<?php echo $row['intro'];?>"></td>
	<td>
	<a href="admin.php?c=video&m=editvideo&vid=<?php echo $row['vid'];?>">修改</a>
	<a href="admin.php?c=video&m=delvideo&vid=<?php echo $row['vid'];?>">删除</a>
	</td>
</tr>

<?php
}
 ?>


</table>
<?php 
//var_dump($data['users']);
 ?>	
</body>
</html>